package com.lxb.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lxb.eduservice.dto.CourseFrontDto;
import com.lxb.eduservice.dto.CourseInfoFormDto;
import com.lxb.eduservice.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lxb.eduservice.vo.course.CoursePublishVo;
import com.lxb.eduservice.vo.front.CourseWebVo;

import java.util.List;
import java.util.Map;

/**
 * 课程管理service层
 *
 * @author lixuebin
 * @since 2022-11-06
 */
public interface EduCourseService extends IService<EduCourse> {


    /**
     * 添加课程信息
     *
     * @param courseInfoFormDto
     * @return 新生成的课程id
     */
    public String saveCourseInfo(CourseInfoFormDto courseInfoFormDto);

    /**
     * 根据id查询课程
     *
     * @param id
     * @return
     */
    public CourseInfoFormDto getCourseById(String id);

    public void updateCourseInfo(CourseInfoFormDto courseInfoFormDto);

    CoursePublishVo getCoursePublishById(String id);

    boolean publishCourseById(String id);

    public void removeCourseById(String courseId);

    List<EduCourse> selectByTeacherID(String id);

    Map<String, Object> pageCourse(Page<EduCourse> coursePage, CourseFrontDto courseFrontDto);

    CourseWebVo getBaseCourseInfo(String courseId);
}

